<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>修改订单 - 东北雨姐给你带派的体验</title>
    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
    <style>
        body {
            font-family: 'Microsoft YaHei', Arial, sans-serif;
            background: linear-gradient(135deg, #3a7bd5 0%, #00d2ff 100%);
            min-height: 100vh;
            color: #222;
            padding: 20px;
        }
        .container {
            max-width: 600px;
            margin: 0 auto;
        }
        .header {
            text-align: center;
            margin-bottom: 30px;
            color: #fff;
        }
        .header h1 {
            font-size: 2em;
            margin-bottom: 10px;
            text-shadow: 2px 2px 8px rgba(0,0,0,0.15);
        }
        .card {
            background: rgba(255,255,255,0.97);
            border-radius: 16px;
            box-shadow: 0 8px 32px rgba(58,123,213,0.12);
            overflow: hidden;
            margin-bottom: 20px;
        }
        .card-header {
            background: linear-gradient(45deg, #2980b9, #6dd5fa);
            color: #fff;
            padding: 20px;
            text-align: center;
        }
        .form-container {
            padding: 30px;
        }
        .form-group {
            margin-bottom: 20px;
        }
        .form-group label {
            display: block;
            margin-bottom: 8px;
            font-weight: 600;
            color: #2980b9;
        }
        .form-group input,
        .form-group select {
            width: 100%;
            padding: 12px 15px;
            border: 2px solid #e3eaf2;
            border-radius: 10px;
            font-size: 1em;
            background: #f8fbff;
            transition: all 0.3s ease;
        }
        .form-group input:focus,
        .form-group select:focus {
            outline: none;
            border-color: #3a7bd5;
            background: #fff;
            box-shadow: 0 0 0 3px rgba(58,123,213,0.08);
        }
        .btn-container {
            text-align: center;
            margin-top: 30px;
        }
        .btn {
            padding: 12px 30px;
            border: none;
            border-radius: 25px;
            text-decoration: none;
            font-size: 1em;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            margin: 0 10px;
        }
        .btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(58,123,213,0.15);
        }
        .btn-primary {
            background: linear-gradient(45deg, #3a7bd5, #00d2ff);
            color: #fff;
        }
        .btn-secondary {
            background: linear-gradient(45deg, #636e72, #b2bec3);
            color: #fff;
        }
        .footer {
            text-align: center;
            margin-top: 30px;
            color: #fff;
            opacity: 0.8;
        }
        @media (max-width: 768px) {
            .container { padding: 10px; }
            .header h1 { font-size: 1.5em; }
            .form-container { padding: 20px; }
            .btn { margin: 5px; }
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="header">
            <h1><i class="fas fa-snowflake"></i> 修改订单 <i class="fas fa-snowflake"></i></h1>
        </div>
        <div class="card">
            <div class="card-header">
                <h2><i class="fas fa-edit"></i> 编辑订单</h2>
            </div>
            <div class="form-container">
                <form th:action="@{/bookings/{id}/update(id=${booking.id})}" th:object="${booking}" method="post">
                    <div class="form-group">
                        <label for="booking_no">订单编号</label>
                        <input type="text" id="booking_no" th:field="*{booking_no}" required>
                    </div>
                    <div class="form-group">
                        <label for="user_id">用户ID</label>
                        <input type="number" id="user_id" th:field="*{user_id}" required>
                    </div>
                    <div class="form-group">
                        <label for="flight_id">航班ID</label>
                        <input type="number" id="flight_id" th:field="*{flight_id}" required>
                    </div>
                    <div class="form-group">
                        <label for="seat_class_id">舱位ID</label>
                        <input type="number" id="seat_class_id" th:field="*{seat_class_id}" required>
                    </div>
                    <div class="form-group">
                        <label for="status">订单状态</label>
                        <select id="status" th:field="*{status}" required>
                            <option value="0">待支付</option>
                            <option value="1">已付定金</option>
                            <option value="2">已全款</option>
                            <option value="3">出票</option>
                            <option value="4">取消</option>
                        </select>
                    </div>
                    <div class="form-group">
                        <label for="total_amount">总金额</label>
                        <input type="number" step="0.01" id="total_amount" th:field="*{total_amount}" required>
                    </div>
                    <div class="form-group">
                        <label for="deposit_paid">已付定金</label>
                        <input type="number" step="0.01" id="deposit_paid" th:field="*{deposit_paid}" required>
                    </div>
                    <div class="form-group">
                        <label for="expire_time">过期时间</label>
                        <input type="datetime-local" id="expire_time" th:field="*{expire_time}">
                    </div>
                    <div class="btn-container">
                        <button type="submit" class="btn btn-primary"><i class="fas fa-save"></i> 保存修改</button>
                        <a href="/bookings" class="btn btn-secondary"><i class="fas fa-arrow-left"></i> 返回列表</a>
                    </div>
                </form>
            </div>
        </div>
        <div class="footer">
            <p><i class="fas fa-snowflake"></i> 东北雨姐航空 <i class="fas fa-snowflake"></i></p>
        </div>
    </div>
</body>
</html>